package per.turtle.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import per.turtle.common.core.annotation.validate.MaxSizeWithCharset;
import per.turtle.common.core.web.entity.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 通知公告表 sys_notice
 *
 * @author turtle
 */
@Schema(name = "SysNotice", description = "通知公告")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_notice")
@ToString
public class SysNotice extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "公告ID")
    @TableId(type = IdType.AUTO)
    private Long noticeId;

    @Schema(description = "公告标题")
    @NotBlank(message = "公告标题不能为空")
    @MaxSizeWithCharset(max = 63, message = "公告标题超出限定长度！")
    private String noticeTitle;

    @Schema(description = "公告类型（1：通知；2：公告）")
    private String noticeType;

    @Schema(description = "公告内容")
    private String noticeContent;

    @Schema(description = "是否停用（1：是；0：否）")
    private Boolean isDisabled;

}
